﻿using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace YJKOpeningDesignInput.ConfigForm
{
	public partial class OpeningSelectForm : System.Windows.Forms.Form
	{
		public bool IsSelectBox
		{
			get
			{
				return this.rbBox.Checked;
			}
			set
			{
				this.rbBox.Checked = value;
			}
		}

		public bool IsSelectLevel
		{
			get
			{
				return this.rbLevel.Checked;
			}
			set
			{
				this.rbLevel.Checked = value;
			}
		}

		public bool IsSelectProject
		{
			get
			{
				return this.rbProject.Checked;
			}
			set
			{
				this.rbProject.Checked = value;
			}
		}

		public OpeningSelectForm()
		{
			this.InitializeComponent();
		}

		private void btnOK_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.OK;
		}

		private void btnCanel_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.Cancel;
		}

		private void OpeningSelectForm_KeyDown(object sender, KeyEventArgs e)
		{
			try
			{
				Keys keyCode = e.KeyCode;
				if (keyCode == Keys.Escape)
				{
					base.Close();
				}
			}
			catch
			{
			}
		}
	}
}
